﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;

namespace BaoShouTangServer
{
    public class Pub
    {
        public static MSXML2.DOMDocument getDom(string Strsql, string strConn)
        {
            MSXML2.DOMDocument dom = new MSXML2.DOMDocument();
            ADODB.Connection conn = new ADODB.Connection();
            ADODB.Recordset rs = new ADODB.Recordset();

            conn.Open(strConn);

            rs.Open(Strsql, conn, ADODB.CursorTypeEnum.adOpenForwardOnly, ADODB.LockTypeEnum.adLockOptimistic, -1);
            rs.Save(dom, ADODB.PersistFormatEnum.adPersistXML);

            return dom;
        }
    }
}